<template>
	<view class="page-live">
		<pageHeader title="lan发现"></pageHeader>
		<!-- <tab :datas="tab" @tabClick="tabClick"></tab> -->
		<fengflow :dataLists="list"></fengflow >
		<loading v-if="loadShow == true"></loading>
		<pageFooter></pageFooter>
	</view>
</template>

<script>
	
	import tab from '../../components/tab.vue'
	import fengflow   from '../../components/feng-flow/feng-flow-new.vue'
	import loading from '../../components/public/loading.vue'
	export default {
		components: {
			tab,
			fengflow,
			loading
		},
		data() {
			return {
				query: {
					"keyWord": "", // 模糊搜索，搜索的字段对应keyWordLikeFields
					"type": '', // 全等于筛选，对应fieldEq
					"page": 0, // 第几页
					"size": 20, // 每页返回个数
					"sort": "desc", // 排序方向
					"order": "id" // 排序字段
				},
				tab:[
					
				],
				list:[
					// {id:2,coverImg:'http://cdn.houselanlanli.com/community/img/20211206/1638778376_9000_2174活动.jpg',collection:'123',nick_name:'张三',headimgurl:'../../static/imgs/user.jpg',title:'甄选项目 I 第七代AOPT超光子',content:'超光子嫩肤M22+修丽可联合治疗全模式/淡斑祛痘'},
					// {id:3,coverImg:'http://cdn.houselanlanli.com/community/img/20211206/1638778376_9000_2174活动.jpg',collection:'43',nick_name:'李四',headimgurl:'../../static/imgs/user.jpg',title:'甄选项目 I 进口除皱专场',content:'美国进口品牌除皱20单位/单部位除皱/高级审美/抗衰年轻化'},
					// {id:4,coverImg:'../../static/goods/faxian3.png',collection:'76',nick_name:'王五',headimgurl:'../../static/imgs/user.jpg',title:'甄选项目 I 第七代AOPT超光子',content:'超光子嫩肤M22+修丽可联合治疗全模式/淡斑祛痘'},
					],
				type:1,
				loadShow:true
			};
		},
		created() {
			this.init()
		},
		methods: {
			post_like(item){
				alert("回调点赞")
			},
			tabClick(data) {
				this.type = data.id
			},
		async init() {
			 let res = await this.$api.communityData(this.query).then(res=> {
				 console.log("发现列表")
					console.log(res)
					// var new_list = [
					// 	{id:3,img:'../../static/goods/faxian2.png',likecount:'43',nickname:'李四',avatar:'../../static/imgs/user.jpg',title:'甄选项目 I 进口除皱专场',desc:'美国进口品牌除皱20单位/单部位除皱/高级审美/抗衰年轻化'},
					// 		{id:4,img:'../../static/goods/faxian3.png',likecount:'76',nickname:'王五',avatar:'../../static/imgs/user.jpg',title:'甄选项目 I 第七代AOPT超光子',desc:'超光子嫩肤M22+修丽可联合治疗全模式/淡斑祛痘'},
					// 	{id:2,img:'../../static/user/poster.jpg',likecount:'123',nickname:'张三',avatar:'../../static/imgs/user.jpg',title:'甄选项目 I 第七代AOPT超光子',desc:'超光子嫩肤M22+修丽可联合治疗全模式/淡斑祛痘'},
					// 		{id:3,img:'../../static/goods/faxian2.png',likecount:'43',nickname:'李四',avatar:'../../static/imgs/user.jpg',title:'甄选项目 I 进口除皱专场',desc:'美国进口品牌除皱20单位/单部位除皱/高级审美/抗衰年轻化'},
							
					// ];
					// for(var i = 0;i < new_list.length;i ++){
					// 	console.log(new_list[i]);
					// 	this.list.push(new_list[i]);
					// }
					if(res.code == 0){
						this.list = res.list;
						console.log(this.list);
					}
					this.loadShow = false;
			 }).catch(err=> { console.log(err) }
			 );
		},
		}
	}
</script>

<style lang="scss">
.page-header {
	padding-bottom: 40rpx;
}
</style>
